Japanese Patent Publication No. 2010-185386A discloses a controller used in an automatically stoppable internal combustion engine provided with an exhaust purification catalyst provided in an exhaust passage of an internal combustion engine, an upstream side air-fuel ratio sensor provided in the exhaust passage at the upstream side of the exhaust purification catalyst in the direction of flow of exhaust, a downstream side air-fuel ratio sensor provided in the exhaust passage at the downstream side of the exhaust purification catalyst in the direction of flow of exhaust, an upstream side sensor heater heating the upstream side air-fuel ratio sensor, and a downstream side sensor heater heating the downstream side air-fuel ratio sensor.
In this controller, for example, while the internal combustion engine is stopped, the upstream side sensor heater and downstream side sensor heater do not heat the upstream side air-fuel ratio sensor and downstream side air-fuel ratio sensor. Further, when cold starting the internal combustion engine or when restarting the internal combustion engine stopped by the automatic stop function, the upstream side sensor heater and the downstream side sensor heater are used to heat the upstream side air-fuel ratio sensor and downstream side air-fuel ratio sensor. In particular, the controller described in Japanese Patent Publication No. 2010-185386A, the heating of the upstream side air-fuel ratio sensor and downstream side air-fuel ratio sensor at startup or after startup of the internal combustion engine is controlled in accordance with the stopped state of the internal combustion engine, the stopped time of the internal combustion engine, etc. According to the controller described in Japanese Patent Publication No. 2010-185386A, due to this, it is considered possible to prevent breakdown of an air-fuel ratio sensor due to the condensed water remaining in the exhaust system.